home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mintmant / pvfork.txt < prev    next >
Text File  |  1992-03-24  |  1KB  |  64 lines

  1. Pvfork(2)                 Oct. 1, 1991                  Pvfork(2)
  2.  
  3.  
  4.  
  5. NAME
  6.      Pvfork - create a copy of the current process
  7.  
  8. SYNOPSIS
  9.      WORD Pvfork();
  10.  
  11. DESCRIPTION
  12.      Pvfork creates a copy of the current process. Both the child
  13.      (the  new process created) and the parent (the process which
  14.      first made the call) share the same address space, i.e.  any
  15.      changes  that  the  child  makes  to  variables will also be
  16.      noticed by the parent.  The  new  process  begins  execution
  17.      with an apparent return from the Pvfork call.
  18.  
  19.      Because the two processes  share  the  same  address  space,
  20.      including  the  same  stack, there could be many problems if
  21.      they actually were running at the same time. Therefore,  the
  22.      parent  process  is suspended until the child process either
  23.      exits or uses mode 200 of Pexec to overlay itself with a new
  24.      program in a new address space.
  25.  
  26. RETURNS
  27.      0 in the child
  28.  
  29.      The new process id (a positive number), in the parent.
  30.  
  31.      ENSMEM if there is not enough memory to create the new  pro-
  32.      cess.
  33.  
  34. SEE ALSO
  35.      Pexec(2), Pfork(2)
  36.  
  37. BUGS
  38.      If the parent is in supervisor mode when this call is  made,
  39.      the  child  will be started in user mode anyway; thus, it is
  40.      strongly recommended that this call be made only  from  user
  41.      mode.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. Version 0.9   Last change: MiNT Programmer's Manual             1
  61.  
  62.  
  63.  
  64.